<template>
  <div>
    <van-overlay :show="is_show">
      <div class="sy_record_select aui-bg-f" id="sy_record_select">
          <div class="content">
              <div class="input aui-margin-b-15 aui-border aui-padded-l-10">
                  <input type="text" name="title" v-model="search.title" placeholder="试用标题" class="aui-ftn14">
              </div>
              <div class="input aui-border aui-padded-l-10">
                  <input type="text" name="title" v-model="search.ordernum" placeholder="订单号" class="aui-ftn14">
              </div>
          </div>
          <van-row>
              <van-col span="12" class="aui-ftn14 aui-text-center confirm_btn aui-bg-red aui-text-f" @click="fnConfirm">确  定</van-col>
              <van-col span="12" class="aui-ftn14 aui-text-center close_btn aui-text-6 aui-border-t" @click="fnChange">关  闭</van-col>
          </van-row>
      </div>
    </van-overlay>
  </div>
</template>
<script>
  export default {
    data () {
      return {
        search: {
          title: '',
          ordernum: '',
          index: -1
        },
        is_show_layer: false
      }
    },
    props:['is_show'],
    methods:{
      // 关闭组件
      fnChange: function() {
        this.is_show_layer = false;
        this.$emit('change', this.is_show_layer);
      },
      fnConfirm: function() {
        this.is_show_layer = false;
        var search = {
          search : this.search,
          show: this.is_show_layer
        }
        this.$emit('confirm', search);
      },
      fnClearData: function() {
        this.search.title = '';
        this.search.ordernum = '';
      }
    }
  }
</script>

<style scoped>
  .van-overlay {
    top: 50px;
  }
  div#sy_record_select div.content {
      padding: 20px 30px;
  }
  div#sy_record_select div.content div.input {
      border-radius: 5px;
      height: 36px;
      line-height: 36px;
  }
  div#sy_record_select div.content div.input input {
    border: 0;
    height: 36px;
    line-height: 36px;
    background-color: transparent!important;
  }
  div#sy_record_select div.content {
      padding-bottom: 20px;
  }
  div#sy_record_select div.confirm_btn,
  div#sy_record_select div.close_btn {
      height: 36px;
      line-height: 36px;
  }
</style>
